use crate::layout::Layout;
use crate::view::aes_endecryptor::AesEnDecryptor;
use crate::view::base64_decode::Base64Decode;
use crate::view::base64_encode::Base64Encode;
use crate::view::cookies_format::CookieFormat;
use crate::view::curl_to_python::CurlToPython;
use crate::view::curl_to_rust::CurlToRust;
use crate::view::diff_compare::TextDiff;
use crate::view::hex_decode::HexDecode;
use crate::view::hex_encode::HexEncode;
use crate::view::json_search::JsonFinder;
use crate::view::ua_generation::UaGenerator;
use crate::view::url_decode::UrlDecode;
use crate::view::url_encode::UrlEncode;
use crate::view::urlformat::UrlFormat;
use dioxus::prelude::*;

use crate::view::rsa_endecryptor::CryptoSuite;
#[derive(Debug, Clone, Routable, PartialEq)]
#[rustfmt::skip]
pub enum Route {
    #[layout(Layout)]
    #[route("/")]
    CurlToPython ,
    #[route("/base64_encode")]
    Base64Encode,
    #[route("/base64_decode")]
    Base64Decode,
    #[route("/url_decode")]
    UrlDecode,
    #[route("/url_encode")]
    UrlEncode,
    #[route("/hex_decode")]
    HexDecode,
    #[route("/hex_encode")]
    HexEncode,
    #[route("/diff_compare")]
    TextDiff,
    #[route("/url_format")]
    UrlFormat,
    #[route("/ua_generation")]
    UaGenerator,
    #[route("/json_finder")]
    JsonFinder,
    #[route("/aes_endecode")]
    AesEnDecryptor,
    #[route("/rsa_endecode")]
    CryptoSuite,

    #[route("/cookies_format")]
     CookieFormat,
    #[route("/curl_to_rust")]
    CurlToRust ,

}

// const MAIN_CSS: Asset = asset!("/assets/main.css");
const LAYOUT_CSS: Asset = asset!("/assets/layout.css");
const HIGHLIGHTCSS: Asset = asset!("/assets/highlight.css");
const HIGHLIGHTJS: Asset = asset!("/assets/highlight.js");
#[component]
pub fn App() -> Element {
    rsx! {
        document::Link { rel: "icon", href: "" }
        document::Link { rel: "stylesheet", href: LAYOUT_CSS }
        document::Link { rel: "stylesheet", href: HIGHLIGHTCSS }
        document::Script{src:HIGHLIGHTJS}
        Router::<Route> {}
    }
}
